<template>
<div class="app-container">
    <div class="flex-main">
        <div class="department-container">
            <tree ref="demartTree" @treeClick="treeClick"></tree>
        </div>
        <div class="user-container">
            <userList ref="userTableView"></userList>
        </div>
    </div>

</div>
</template>

<script>
import userList from "./list";
import tree from "../department/tree";

export default {
    components: {
        userList,
        tree,
    },
    data() {
        return {

        };
    },
    created() {
    },
    methods: {
        // 获取部门下人员
        treeClick(data) {
            this.$refs["userTableView"].doSearch({department_id:data});
        },
    },
};
</script>

<style lang="scss">
.flex-main {
    display: flex;

    .department-container {
        flex: 0 20%;
        height: calc( 100vh - 74px );
        padding-right: 12px;
        border-right: 1px solid #dedede;
        overflow: auto;
    }

    .user-container {
        flex: 1;
    }
}
</style>
